package main

import "fmt"

func main() {
	numbers := []int{0,1,2,3,4,5,6,7,8}
	printSlice(numbers)

	numbers1 := numbers[1:4]
	printSlice(numbers1)

	numbers2 := numbers[2:]
	printSlice(numbers2)

	numbers3 := numbers[:5]
	printSlice(numbers3)

	numbers5 := numbers[1:4]
	printSlice(numbers5)
}

func printSlice(numbers []int)  {
	fmt.Printf("len=%d,cap=%d,slice = %v \n",len(numbers),cap(numbers),numbers)
}
